﻿using System.Windows.Controls;
using DALHelper.Business;
using System.Windows;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace ResortManager.Wizard
{
    /// <summary>
    /// Interaction logic for DefaultConfiguration1.xaml
    /// </summary>
    public partial class BRConfig1 : UserControl, IProceedureComponent
    {
        private pgLokupDetails m_pgDetailLookup;
        public BRConfig1()
        {
            InitializeComponent();
            m_pgDetailLookup = new pgLokupDetails();
            grdDetailLookup.Children.Add(m_pgDetailLookup);
            m_pgDetailLookup.IsBookingRoom = true;
        }

        #region IProceedureComponent Members

        public string KeyText
        {
            get { return "Nhập thông tin"; }
        }

        public bool RequestNext()
        {
            ParentWizard.WizardCommonData = m_pgDetailLookup.TransDetailData;
            return true;
        }

        public void UpdateComponent()
        {
            IEnumerable<TransDetail> transDetails = ParentWizard.WizardCommonData as IEnumerable<TransDetail>;
            m_pgDetailLookup.TransDetailData = transDetails;
        }

        public ProceedureDialog ParentWizard
        {
            get;
            set;
        }

        #endregion
    }
}
